<?php

/** @var string $sid */
/** @var object $arr_data */


$player = $game->player_get_uinfo();

$player1 = $game->player_get_uinfo_uid( $arr_data->uid );
$好友菜单 = '';

$链接_攻击 = $game->create_url_obj_init();
$链接_加为好友 = $game->create_url_obj_init();
$链接_删除好友 = $game->create_url_obj_init();
$链接_门派 = $game->create_url_obj_init();

$clubplayer = $game->clubplayer_get_player_uid($arr_data->uid);
if (isset($canshu)){
    if ($canshu == "addim"){
        $game->im_add($uid);
    }
}

if ($clubplayer){
    $club = $game->club_get_info($clubplayer->clubid);
    $链接_门派 = $game->create_url_obj("cmd=club&clubid=$club->clubid",$club->clubname);
}

if ($player->sid != $player1->sid){
    $链接_攻击 = $game->create_url_obj("cmd=pvp&cmd2=into_pvp&uid=$arr_data->uid","攻击");
    $ret = $game->im_is($arr_data->uid);
    if (!$ret){
        $链接_加为好友 = $game->create_url_obj("cmd=otherzhuangtai&cmd2=otherzhuangtai&canshu=addim&uid=$arr_data->uid","加为好友");
    }else{
        //$chat=  $game->create_url("cmd=otherzhuangtai&canshu=addim&uid=$arr_data->uid");
        $链接_删除好友 =  $game->create_url_obj("cmd=im&canshu=deim&uid=$arr_data->uid","删除好友");
    }
}

$tool = array();
$player1 = (array) $player1;
for ($i = 1 ; $i <= 6 ; $i++){
    if ($player1["tool$i"]){

        $zhuangbei = $game->zb_get($player1["tool$i"]);
        if ($zhuangbei->qianghua > 0 ){
            $qhs = '+'.$zhuangbei->qianghua;
        }else{
            $qhs = '';
        }

        $tool[$i] = $game->create_url_obj( "cmd=zbinfo&cmd2=zbinfo&zbnowid={$player1["tool$i"]}" , "{$zhuangbei->zbname}{$qhs}");
    }else{
        $tool[$i] =$game->create_url_obj_init();
    }
}
$player1 = (object) $player1;


$game_zb1 = $game->get_system_config("游戏","装备1");
$game_zb2 = $game->get_system_config("游戏","装备2");
$game_zb3 = $game->get_system_config("游戏","装备3");
$game_zb4 = $game->get_system_config("游戏","装备4");
$game_zb5 = $game->get_system_config("游戏","装备5");
$game_zb6 = $game->get_system_config("游戏","装备6");

$html = "
==寻仙纪 状态==<br/> 
昵称:$player1->uname<br/>
门派:{$链接_门派->按钮短}<br/>
境界:{$player1->jingjie}{$player1->cengci}<br/>
等级:$player1->ulv<br/>
修为:$player1->uexp/$player1->umaxexp<br/>
灵石:$player1->uyxb<br/>
极品灵石:$player1->uczb<br/>
气血:$player1->uhp/$player1->umaxhp<br/>
攻击:$player1->ugj<br/>
防御:$player1->ufy<br/>
暴击:$player1->ubj%<br/>
吸血:$player1->uxx%<br/>
========<br/>
$game_zb1:{$tool[1]->按钮短}<br/>
$game_zb2:{$tool[2]->按钮短}<br/>
$game_zb3:{$tool[3]->按钮短}<br/>
$game_zb4:{$tool[4]->按钮短}<br/>
$game_zb5:{$tool[5]->按钮短}<br/>
$game_zb6:{$tool[6]->按钮短}<br/><br/>
{$链接_攻击->按钮短}{$链接_加为好友->按钮短}{$链接_删除好友->按钮短}

{$变量_系统->链接_返回游戏->按钮长}
";

echo $html;